/*================================================================
*   文件名称：main.cpp
*   创 建 者：yang qiang
*   创建日期：2021年02月27日
*   描    述：
*   Copyright (C) 2021 All rights reserved.
*
* ================================================================*/


#include <iostream>
#include <vector>
using namespace std;

int process(int L, int s, int t, char *stone){
    vector<int> dp(L+t, L);

    for(int i = s; i <= t; i++){
        if(stone[i] == 1){
            dp[i] = 1;
        }else {
            dp[i] = 0;
        }

    }

    for(int i = t + 1; i < L + t; i++){
        for(int j = i - t; j <= i - s; j++){
            dp[i] = min(dp[i], dp[j] + stone[i]);
        }
    }

    return dp[L+t-1];
}

int main(){
    int L, s, t, n;
    cin>>L>>s>>t>>n;
    char stone[L+t+1] = {0};
    for(int i = 0; i < n; i++){
        int tmp;
        cin >> tmp;
        stone[tmp] = 1;
    }

    cout << process(L, s, t, stone) << endl;
}
